#ifndef _LINKED_LIST_
#define _LINKED_LIST_

class linkedListItem {
 private:
  linkedListItem *nextPtr;
  friend class linkedList;

 public:
  int value;
  linkedListItem() {nextPtr = NULL;}
};

class linkedList {
 private:
  linkedListItem *headPtr;
  linkedListItem *tailPtr;

 public:
  void add(int item);
  linkedListItem* head();
  linkedListItem* tail();
  linkedListItem* find(int val);
  void clear();
  linkedList() {headPtr = tailPtr = NULL;}
  ~linkedList();
};

#endif
